package com.viu.technology.service.async;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;

import java.util.concurrent.Executor;

@Service
public class AsyncServiceImpl implements AsyncService {

    private static Logger log = LoggerFactory.getLogger(AsyncServiceImpl.class);


    @Async("asyncServiceExecutor")
    @Override
    public void executeAsync() throws InterruptedException {
        log.info("start execute");
        Thread.sleep(10000);
        log.info("end execute");

    }
}
